<?php
class community_member_row extends system_concept_row {

	protected $_avatar = null;
	/**
	 * @return resource_display
	 */
	public function getAvatar() {
		if($this->_avatar === null || $this->_avatar->getHash() != $this->get('avatar')) {
			$this->_avatar = new resource_display($this->get('avatar'), 'avatar');
		}
		return $this->_avatar;
	}
	
	public function getOauth($source_id) {
		$concept = new community_oauth_concept($source_id);
		return $concept->fetch(array('oauth.passport_id = ?' => $this->getId()));
	}
	
}
